package com.tj.controller;


import com.tj.pojo.Dish;
import com.tj.pojo.Setmeal;
import com.tj.service.SetmealService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Set;

@RestController
@Slf4j
@RequestMapping("/setmeal")
public class SetmealController {
    @Autowired
    SetmealService setmealService;

    @GetMapping("/list")
    private Result<List<Setmeal>> getDishList(Long categoryId, int status) {

        //1.获取所有菜品
        List<Setmeal> res = setmealService.getByCategory(categoryId);

        //2.返回结果
        return  Result.success(res);
    }
}
